//
//  SignalAnnotationView.m
//  Portable Traffic Signal Assistor
//
//  Created by Hao Xu on 5/31/12.
//  Copyright (c) 2012 TTU. All rights reserved.
//

#import "SignalAnnotationView.h"

@implementation SignalAnnotationView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/
- (id)initWithAnnotation:(id <MKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithAnnotation:annotation reuseIdentifier:reuseIdentifier];
    if (self != nil)
    {
        CGRect frame = self.frame;
        frame.size = CGSizeMake(15.0, 30.0);
        self.frame = frame;
        self.backgroundColor = [UIColor clearColor];
        self.centerOffset = CGPointMake(-5, -5);
    }
    return self;
}
-(void) drawRect:(CGRect)rect
{
    [[UIImage imageNamed:@"green_signal.png"] drawInRect:CGRectMake(0, 0, 15.0, 30.0)];
}

- (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate
{
    self.coordinate=newCoordinate;
}




@end
